import request from '@/utils/request'

// 查询代驾服务评价列表
export function listRating(query) {
  return request({
    url: '/driver/rating/list',
    method: 'get',
    params: query
  })
}

// 查询代驾服务评价详细
export function getRating(ratingId) {
  return request({
    url: '/driver/rating/' + ratingId,
    method: 'get'
  })
}

// 新增代驾服务评价
export function addRating(data) {
  return request({
    url: '/driver/rating',
    method: 'post',
    data: data
  })
}

// 修改代驾服务评价
export function updateRating(data) {
  return request({
    url: '/driver/rating',
    method: 'put',
    data: data
  })
}

// 删除代驾服务评价
export function delRating(ratingId) {
  return request({
    url: '/driver/rating/' + ratingId,
    method: 'delete'
  })
}
